package cn.edu.ncut.cs.springboot.mybatisplusemployee.service.impl;

import cn.edu.ncut.cs.springboot.mybatisplusemployee.entity.Permission;
import cn.edu.ncut.cs.springboot.mybatisplusemployee.mapper.PermissionMapper;
import cn.edu.ncut.cs.springboot.mybatisplusemployee.service.IPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ncut
 * @since 2024-12-24
 */
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements IPermissionService {
    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public List<Permission> getPermissions(Long roleId) {
        return permissionMapper.getPermissionsById(roleId);
    }
}
